/*
 * CManagerMtr.h
 *
 *  Created on: 2017-2-4
 *      Author: root
 */

#ifndef CMANAGERMTR_H_
#define CMANAGERMTR_H_
#include"PublicTool.h"
#include"WorkMtrApi.h"
#include"CSingleThreadManager.h"
//废弃勿用
#if USE_THREAD_MANAGER&&USE_PUBLIC_MTR
class CManagerMtr{
    CSingleThreadManager m_thread;
    PublicLock m_Mutex;
    SETIPLIST m_waitlist;//等待队列
    SETIPLIST m_worklist;//工作队列
#if USE_PUBLIC_MYSQL
    int       m_mysqltype;//选用数据库类型
    char      m_databasename[32];//设置数据库
    char      m_tablename[32];//设置表名
#endif
private:

public:
    CManagerMtr();
    ~CManagerMtr();
    void RunOnce();
    void InsertIPList(SETIPLIST iplist);
    void SetMysqlInfo(int type,const char*db,const char*table);
    void UpLoadMtrResult(MAPSTRINGLIST result);//上传MTR结果
};
extern CManagerMtr g_managermtr;
#endif
#endif /* CMANAGERMTR_H_ */
